﻿<Window x:Class="_2.CountriesAndTownsLists.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
    <Grid x:Name="GridMain">
        <Label Margin="12,0,417,282">Countries:</Label>
        <ListBox Height="100" HorizontalAlignment="Left" Margin="12,27,0,0" Name="listBoxCountries" 
                 VerticalAlignment="Top" Width="120" ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Path=Name}"></TextBlock>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <Label Content="Language:" Height="28" HorizontalAlignment="Left" Margin="12,133,0,0" Name="label1" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="12,157,0,0" Name="textBoxLanguage" 
                 VerticalAlignment="Top" Width="120" Text="{Binding Path=Language}" />
        <Label Margin="12,186,427,95">Flag:</Label>
        <Image Height="66" HorizontalAlignment="Left" Margin="12,211,0,0" Name="image" 
               Stretch="Fill" VerticalAlignment="Top" Width="131" 
               Source="{Binding Image}" />
        <ListBox Height="100" HorizontalAlignment="Left" IsSynchronizedWithCurrentItem="True" 
                 ItemsSource="{Binding Path=Towns}" Margin="164,27,0,0" Name="listBoxTowns" VerticalAlignment="Top" Width="120">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Path=TownName}" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        <Label Content="Towns:" Margin="164,0,265,282" />
        <Label Content="Population:" Height="28" HorizontalAlignment="Left" Margin="164,133,0,0" Name="label" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="164,157,0,0" Name="textBoxPopulation" Text="{Binding Path=Towns/Population}" VerticalAlignment="Top" Width="120" />
    </Grid>
</Window>
